class SignupController {

  def index = { redirect(action:signup,params:params) }

  def signup = {
    def eventPositionInstance = EventPosition.get( params.id )
    def eventInstance = Event.get(params.id)

    def volunteer = session.volunteer.id
    eventPositionInstance.addVolunteer(volunteer)
    eventInstance.updatePosition(eventPositionInstance).save(flush:true)
    render(view:'signupConfirmation',model:[eventPositionInstance:eventPositionInstance, event:eventInstance])
  }
}
